home *** CD-ROM | disk | FTP | other *** search
/ Brotikasten / BROTCD01.iso / c128 / c16.d64 / cp_m transdoc < prev    next >
Text File  |  1995-08-08  |  3KB  |  80 lines

  1. C128 to CP/M Memory Transfer Technique
  2.  
  3. The following technique has been mentioned in several messages on the TPUG and
  4. Commodore sigs in the past month, but I am certain that many members may have
  5. missed it.  Therefore I am uploading these instructions so that all may have
  6. access to this relatively simple and fast technique for transfering binary CP/M
  7. files to your CP/M disks.
  8.  
  9. I must appologize for not giving proper credit to the individual who first
  10. posted this techniques in the SIGS, but the name escapes me at this time.
  11.  
  12. Please note that this technique should NOT be used to transfer ASCII text type
  13. files from C64 or C128 downloads.  The reason is that these types of files have
  14. the linefeeds stripped off when downloaded in this environment.  Linefeeds are
  15. required by CP/M and thus any files transferred in this manner which are not
  16. binary type formats will not be usable with this method.  CPM271.IMG in this
  17. sig may be used to transfer this type of file to your CP/M disks.
  18.  
  19.  
  20. Steps to follow to transfer binary CP/M files to CP/M disk:
  21.  
  22. 1.  If the file is greater than 50K or so, forget it, you don't have enough
  23.     memory for this technique.  Use CPM271.IMG instead.
  24.  
  25. 2.  Download the file to your C64/C128 disk as a prg file.
  26.  
  27. 3.  In C128 mode, issue the following command:  
  28.  
  29.     bload"filename",b1,p7170
  30.  
  31.     This loads all of the file into bank 1 of memory EXCEPT the first two bytes
  32.     since BLOAD treats them as a load address (prg file).
  33.  
  34. 4.  Get the first two bytes of the file by running the following short basic
  35.     program:
  36.  
  37.     10 open2,8,2,"filename,p,r"
  38.     20 get#2,a$:ifa$=""thena$=chr$(0)
  39.     30 bank1:poke 7168,asc(a$)
  40.     40 get#2,a$:ifa$=""thena$=chr$(0)
  41.     50 bank1:poke 7169,asc(a$)
  42.     60 close2
  43.  
  44. 5.  Enter the monitor with the 'monitor' command.
  45.  
  46. 6.  Use m 11c00 to begin looking for the eof address for the file.  You can
  47.     a lot of time here by estimating where it is (number of blocks on disk
  48.     times 256 bytes).  Otherwise, keep using the 'm' command until you have
  49.     the eof address (in hex).  Be sure to look at bank 1 only!
  50.  
  51. 7.  Use x command to exit the monitor.
  52.  
  53. 8.  Place CP/M system disk in drive.
  54.  
  55. 9.  Use BOOT command to boot your CP/M system.
  56.  
  57. 10. Place CP/M disk with the SAVE command on it (back side of original CP/M
  58.     disk) in the drive.
  59.  
  60. 11. Enter SAVE command at A> prompt.  Nothing will appear to happen except
  61.     command is loaded from disk.
  62.  
  63. 12. Enter SAVE command again.
  64.  
  65. 13. Answer prompt with E:filename.ext, 1c00 for start address, and the end
  66.     address you determined from the monitor procedure (in hex).
  67.  
  68. 14. Insert the CP/M formatted disk you wish to save the file on at the E disk
  69.     prompt and hit return.
  70.  
  71. 15. Viola!  The file is now on your CP/M disk.
  72.  
  73.  
  74. I hope that this procedure is of use to all of you who are hungry for CP/M
  75. software.  There is a wealth of excellent public domain CP/M software online
  76. here in the CP/MIG and KAYPRO SIGS.  Have fun!
  77.  
  78.  
  79. Mike McLawhorn
  80.